﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Subtle.Domain.Models;

namespace Subtle.Areas.Administration.ViewModels
{
	/// <summary>
	/// Post View Model
	/// </summary>
	public class PostViewModel
	{
		public int ID { get; set; }
		public string Title { get; set; }
		public string Body { get; set; }
		public string Tags { get; set; }
		public string CategoryDescription { get; set; }

		/// <summary>
		/// Get Model
		/// </summary>
		/// <param name="post"></param>
		/// <returns></returns>
		public static PostViewModel GetModel(Post post)
		{
			PostViewModel postViewModel = new PostViewModel();
			postViewModel = AutoMapper.Mapper.Map<Post, PostViewModel>(post, postViewModel);
			return postViewModel;
		}
	}
}